#include "versiondialog.h"
#include "ui_versiondialog.h"

VersionDialog::VersionDialog(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::VersionDialog)
{
    ui->setupUi(this);

    setShadow({ui->widget});
    if (windowWidth >= 1280) {
        this->setProperty("cssSize", "large");
        this->setGeometry(0,0,1280,800);
    }

    connect(BllDataFlow::getInstance(), &BllDataFlow::retranslateUiSignal, this, &VersionDialog::retranslateUiSlot);
}

VersionDialog::~VersionDialog()
{
    delete ui;
}

void VersionDialog::on_btnOk_clicked()
{
    this->hide();
}


void VersionDialog::on_btnClose_clicked()
{
    this->hide();
}

void VersionDialog::retranslateUiSlot()
{
    ui->retranslateUi(this);
}

void VersionDialog::setInfo(const QString &upVersion, const QString &downVersion)
{
    ui->lblUpVersion->setText(upVersion);
    ui->lblDownVersion->setText(downVersion);
}
